package handler

import (
	"github.com/gin-gonic/gin"
	"video-master/pkg"
)

func List(c *gin.Context) {
	uid, _ := c.Get("uid")
	c.JSON(200, gin.H{
		"code": 200,
		"msg":  "ok",
		"uid":  uid,
	})
	return
}
func Login(c *gin.Context) {
	uid := c.Query("uid")
	token, _ := pkg.TokenHandler(uid)
	c.JSON(200, gin.H{
		"code": 200,
		"msg":  "success",
		"data": token,
	})
	return
}
